const {merge} = require('webpack-merge');
const common = require('./webpack.common');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const copyWebpackPlugin = require('copy-webpack-plugin');
module.exports = merge(common, {
   mode: 'production',
    optimization: {
       splitChunks: {
           chunks: 'all'
       }
    },
    plugins: [
        new CleanWebpackPlugin(),
        new copyWebpackPlugin({
            patterns: [
                {
                    from : 'public',
                    to: 'public'
                }
            ]
        })
    ]
});
